package userclass;

import libraryClass.Book;
import libraryClass.Library;

public class Administrator extends User{

	public Administrator(String name, long iD, String password) {
		super(name, iD, password);
		// TODO 自动生成的构造函数存根
	}

	public Book addBook(String name,long ID,String category,int amount) {
		Book book=new Book(name,ID,category);
		Library.add(book, amount);

		return book;
	}

	public Book removeBook( long ID ) {
		Book book=Library.peekBook(ID);
		if(book!=null)
			Library.remove(book);

		return book;

	}



	public User addUser( String name,long ID ,String password) {
		User user=new User(name, ID, password);
		UserUnit.add(user);
		return user;
	}

	public User removeUser(long ID ) {
		User user=UserUnit.peekUser(ID);
		UserUnit.remove(user);
		return user;
	}

}
